﻿using MenusHunter.WinRT.Core.MVVM;

namespace MenusHunter.WinRT.Core.ViewModels
{
    public class AccountSettingsViewModel:ViewModelBase
    {
        private ReplayCommand _logoutCommand;
       
        public ReplayCommand LogoutCommand { get
        {
            if(_logoutCommand == null) _logoutCommand = new ReplayCommand(param=>Logout());
            return _logoutCommand;
        } }

        private void Logout()
        {
            Windows.Storage.ApplicationData.Current.LocalSettings.Values.Clear();
            OnPropertyChanged("LogoutSuccess");
        }
    }
}
